import org.junit.Test;
import org.springframework.security.crypto.bcrypt.BCrypt;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

public class demo2 {


    @Test
    public void deme11(){
        String hashpw = BCrypt.hashpw("1234", BCrypt.gensalt());
        System.out.println(hashpw);

        if (BCrypt.checkpw("1234","$2a$10$ebXJBPeY9tkepXF8LVYNveOTpdHbpkvcRH6G.Xi9kxQey6LjOBCoe")){
            System.out.println("匹配");
        }else {
            System.out.println("bu");
        }


        //$2a$10$ebXJBPeY9tkepXF8LVYNveOTpdHbpkvcRH6G.Xi9kxQey6LjOBCoe
    }
}
